{extend name="../../admin/view/main"}

{block name="content"}
<div id="TruckForm">
    <form action="{:sysuri()}" class='layui-form layui-card shadow' data-auto="true" method="post">
        <div class="layui-card-body padding-40 padding-bottom-10">

            <div class="layui-form-item label-required-prev">
                <span class="help-label"><b>绑定公证处</b></span>
                <select class='layui-select' name='notarial_office_id' lay-search>
                    {foreach $cates as $cate}
                    {eq name='cate.id' value='$vo.notarial_office_id|default=0'}
                    <option selected value='{$cate.id}'>{$cate.name}</option>
                    {else}
                    <option value='{$cate.id}'>{$cate.name}</option>
                    {/eq}{/foreach}
                </select>
            </div>

            <div class="layui-form-item label-required-prev">
                <span class="help-label"><b>公正事项</b></span>
                <select class='layui-select' name='type' lay-search>
                    {foreach ['委托公证','声明书公证','亲属关系公证'] as $k=>$v}
                    {if isset($vo.type) && $vo.type eq $k}
                    <option selected value='{$k}'>{$v}</option>
                    {else}
                    <option value='{$k}'>{$v}</option>
                    {/if}{/foreach}
                </select>
            </div>

            <!--<label class="layui-form-item block relative">-->
            <!--    <span class="help-label"><b>公证类型</b></span>-->
            <!--    <input class="layui-input" name="name" placeholder="请输入公证类型" value='{$vo.name|default=""}'>-->
            <!--</label>-->
            <div class="layui-form-item label-required-prev">
                <span class="help-label"><b>计费规则</b></span>
                <table class="layui-table">
                    <thead>
                    <tr>
                        <th class="nowrap text-center">首费（元）</th>
                        <th class="nowrap text-center">续费（元）</th>
                    </tr>
                    </thead>
                    <tbody>
                    <tr ng-if="item.city.length > 0" ng-repeat="item in rules">
                        <td class="padding-0 text-center">
                            <input class="layui-input text-center padding-left-0 border-0" name="initial_amount" required value='{$vo.initial_amount|default="1.00"}'>
                        </td>
                        <td class="padding-0 text-center">
                            <input class="layui-input text-center padding-left-0 border-0" name="continued_amount" required value='{$vo.continued_amount|default="1.00"}'>
                        </td>
                    </tr>
                    </tbody>
                </table>
            </div>

            <div class="hr-line-dashed margin-top-30"></div>
            {notempty name='vo.id'}<input name="id" type="hidden" value="{$vo.id}">{/notempty}

            <div class="layui-form-item text-center">
                <button class="layui-btn" type='submit'>保存数据</button>
            </div>
        </div>
    </form>

</div>
{/block}
